package com.cd.mc.controller;

import com.cd.common.controller.BaseController;
import com.cd.mc.service.BeanService;
import com.cd.mc.service.EnrollService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/enroll")
public class EnrollController extends BaseController {

    private static final Logger logger = LoggerFactory.getLogger(EnrollController.class);

    @Autowired
    private EnrollService service;

    @Autowired
    private BeanService beanService;
    @RequestMapping("/hello")
    public String hello(){
        return "hello";
    }

    @RequestMapping("/all")
    public String getAllEnroll(@RequestParam int cateId,
                               @RequestParam String day){
        return service.getAllEnroll(cateId, day);
    }

    /**
     * @Description 测试beanEXT重写
     * @Author lqq
     * @Date 2024/10/24 10:13
     **/
    @RequestMapping("/all1")
    public String getAllEnroll1(){
        return beanService.getBeanName();
    }
}
